package com.kyrioscraft.cloud.thead.jdklab.tools.simple;

public class SimpleDemo {

    private int count = 5;

    public static void main(String[] args) {
//        Thread myThread = new MyThread();
//        myThread.setName("thread1");
//        myThread.start();

        Thread runnableThread = new Thread(new MyRunnable());
        runnableThread.setName("thread2");
        runnableThread.start();
        runnableThread.setPriority(6);

        Thread thread3 = new MyThread();
        thread3.setName("thread3");
        Thread thread4 = new MyThread();
        thread4.setName("thread4");
        Thread thread5 = new MyThread();
        thread5.setName("thread5");
        thread3.start();
        thread4.start();
        thread5.start();

        System.out.println("main thread");
    }
}
